/*
** my_mastermind.h for mastermind in /home/deubel_j//colle
** 
** Made by james deubelbeiss
** Login   <deubel_j@epitech.net>
** 
** Started on  Mon Apr 18 20:38:36 2011 james deubelbeiss
** Last update Mon Apr 18 22:53:33 2011 james deubelbeiss
*/

#ifndef __MY_MASTERMIND_H__
#define	__MY_MASTERMIND_H__

typedef struct s_args
{
  char  *code;
  char  *pions;
  int   tentatives;
  int   slots;
  int	c;
} t_args;

void     my_mm_play(t_args *args);
int     my_mm_tour(t_args *args, int tour, char *buf);
int     my_mm_good(char *str, char *code);
int     my_mm_bad(char *str, char *code);

int     my_check_args(t_args *args);
int     my_check_str_base(char *str, char *base);
int     my_check_doublon(char *str);

void	*xmalloc(int size);
void	xfree(void *ptr);
int	my_strlen(char *s);
int	my_strcmp(char *s1, char *s2);

t_args  *parse_opts(int ac, char **av);
t_args  *init_struct();
t_args	*parse_opts(int ac, char **av);
t_args	*do_s(t_args *ar, char **av, int i);
t_args	*do_c(t_args *ar, char **av, int i);
t_args  *do_p(t_args *ar, char **av, int i);

char	*my_strcpy(char *dest, char *src);
char	*my_strdup(char *s);

#endif
